import type { ResponseInterface } from 'src/common/interface/response';

export interface Letter {
  id: number;
  content: string;
  current: string;
  createdAt: string;
  updatedAt: string;
}

// 查询接口
export type QueryResponse = ResponseInterface<Letter[]>;

// 查询一封信页面内容的接口
export type QueryCurrentResponse = ResponseInterface<Letter>;

// 新增接口
export type LetterDataInterface = Omit<Letter, 'id'>;
export type AddParam = Pick<Letter, 'content'>;
export type AddResponse = ResponseInterface<object>;

// 更新接口
export type UpdateParam = Pick<Letter, 'content' | 'id'>;
export type UpdateResponse = ResponseInterface<object>;

// 将信件设置为一封信的内容
export type UpdateCurrentParam = Pick<Letter, 'id'>;
export type UpdateCurrentResponse = ResponseInterface<object>;

// 删除
export type DtlCurrentParam = Pick<Letter, 'id'>;
export type DtlCurrentResponse = ResponseInterface<object>;
